package com.qidianit.mes.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @ author: 周晓轩
 * @ company 起点编程
 * @ time: 2025/9/23 - 19:52
 * @ Description:
 */
@Data
@TableName("bom")
public class Bom {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String mainMaterialCode;

    private String componentMaterialCode;

    private BigDecimal usageRatio;

    private String remark;

    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    private Integer deleteFlag;

    @TableField(exist = false)
    private Material componentMaterial;
}
